<?php 

/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 *
 * @package     App_Backend
 * @subpackage  View
 * @author      Cheng Wei <berlios.o@gmail.com>
 * @version     $$Id: messages.phtml 20 2010-12-18 09:35:07Z cheng.wei $$
 */

$session = $this->getSession();

$messages = $session->getMessages();
$session->clearMessages();
?>
<div id="content-wrapper" class="content-wrapper">
<?php foreach ($messages as $msg):?>
<?php if($msg['level']=='error') :?>
<div class="messages  error2 close" >
	<ul class="message-list ">
	<h2>Error!</h2>
	<p class=""><?php echo $msg->getMessage()?></p>
	</ul>
</div>
<?php else :?>
<div class="messages  success close" >
	<ul class="message-list ">
	<h2>Congratulations!</h2>
	<p class=""><?php echo $msg->getMessage()?></p>
	</ul>
</div>
<?php endif;?>
<?php endforeach; ?>
</div>
<script type="text/javascript">
<!--
$().ready(function() {
	$(".messages").each(function(i){
		var element=$(this);
		setTimeout(function(){
			element.fadeOut("slow");
		},2000);

	 }); 
	
});
//-->
</script>
